using System;
using System.Collections.Generic;
using Microsoft.WindowsAzure.StorageClient;

namespace AzureContrib.WindowsAzure.StorageClient
{
	/// <summary>
	/// Contract for <see cref="CloudQueueClient"/>
	/// </summary>
	public interface ICloudQueueClient
	{
		/// <summary>
		/// <see cref="CloudQueueClient.RetryPolicy"/>
		/// </summary>
		RetryPolicy RetryPolicy { get; set; }

		/// <summary>
		/// <see cref="CloudQueueClient.Timeout"/>
		/// </summary>
		TimeSpan Timeout { get; set; }

		/// <summary>
		/// <see cref="CloudQueueClient.ApproximateMessageCountCacheLength"/>
		/// </summary>
		TimeSpan ApproximateMessageCountCacheLength { get; set; }

		/// <summary>
		/// <see cref="CloudQueueClient.UsePathStyleUris"/>
		/// </summary>
		bool UsePathStyleUris { get; }

		/// <summary>
		/// <see cref="CloudQueueClient.Credentials"/>
		/// </summary>
		IStorageCredentials Credentials { get; }

		/// <summary>
		/// <see cref="CloudQueueClient.GetQueueReference"/>
		/// </summary>
		ICloudQueue GetQueueReference(string queueAddress);

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueues()"/>
		/// </summary>
		IEnumerable<ICloudQueue> ListQueues();

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueues(string)"/>
		/// </summary>
		IEnumerable<ICloudQueue> ListQueues(string prefix);

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueues(string,QueueListingDetails)"/>
		/// </summary>
		IEnumerable<ICloudQueue> ListQueues(string prefix, QueueListingDetails detailsIncluded);

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueuesSegmented()"/>
		/// </summary>
		IResultSegment<ICloudQueue> ListQueuesSegmented();

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueuesSegmented(string,QueueListingDetails)"/>
		/// </summary>
		IResultSegment<ICloudQueue> ListQueuesSegmented(string prefix, QueueListingDetails detailsIncluded);

		/// <summary>
		/// <see cref="CloudQueueClient.ListQueuesSegmented(string,QueueListingDetails,int,ResultContinuation)"/>
		/// </summary>
		IResultSegment<ICloudQueue> ListQueuesSegmented(string prefix, QueueListingDetails detailsIncluded, int maxResults, ResultContinuation continuationToken);

		/// <summary>
		/// <see cref="CloudQueueClient.BeginListQueuesSegmented(AsyncCallback,object)"/>
		/// </summary>
		IAsyncResult BeginListQueuesSegmented(AsyncCallback callback, object state);

		/// <summary>
		/// <see cref="CloudQueueClient.BeginListQueuesSegmented(string,AsyncCallback,object)"/>
		/// </summary>
		IAsyncResult BeginListQueuesSegmented(string prefix, AsyncCallback callback, object state);

		/// <summary>
		/// <see cref="CloudQueueClient.BeginListQueuesSegmented(string,QueueListingDetails,AsyncCallback,object)"/>
		/// </summary>
		IAsyncResult BeginListQueuesSegmented(string prefix, QueueListingDetails detailsIncluded, AsyncCallback callback, object state);

		/// <summary>
		/// <see cref="CloudQueueClient.BeginListQueuesSegmented(string,QueueListingDetails,int,ResultContinuation,AsyncCallback,object)"/>
		/// </summary>
		IAsyncResult BeginListQueuesSegmented(string prefix, QueueListingDetails detailsIncluded, int maxResults, ResultContinuation continuationToken, AsyncCallback callback, object state);

		/// <summary>
		/// <see cref="CloudQueueClient.EndListQueuesSegmented"/>
		/// </summary>
		IResultSegment<ICloudQueue> EndListQueuesSegmented(IAsyncResult asyncResult);

		/// <summary>
		/// <see cref="CloudQueueClient.ResponseReceived"/>
		/// </summary>
		event EventHandler<ResponseReceivedEventArgs> ResponseReceived;
	}
}